﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Detail.aspx.vb" Inherits="Assignment2.Detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>Details</h1>
<br />
    <asp:Label ID="lblDet" CssClass="adddetails" runat="server" Text="Addition details of a particular user"></asp:Label>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSourceDetails" CellPadding="4" 
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:ImageField HeaderText="Avatar" DataImageUrlField="UserAvatarPicture">
                    <ControlStyle CssClass="avatarpicture" />
                </asp:ImageField>
                <asp:BoundField DataField="UserFirstName" HeaderText="Name" 
                    SortExpression="UserFirstName" />
                <asp:BoundField DataField="UserLastName" HeaderText="Surname" 
                    SortExpression="UserLastName" />
               <asp:TemplateField HeaderText="Qualifications">
                <ItemTemplate>
                    <%# getLevel(Eval("UserLevel"))%>        
                </ItemTemplate>
            </asp:TemplateField>
                <asp:BoundField DataField="UserHobbies" HeaderText="Hobbies" 
                    SortExpression="UserHobbies" />
                <asp:BoundField DataField="UserEmail" HeaderText="Email" 
                    SortExpression="UserEmail" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSourceDetails" runat="server" 
            ConnectionString="<%$ ConnectionStrings:learningConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:learningConnectionString.ProviderName %>" 
            SelectCommand="SELECT * FROM [UserContent] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>

</asp:Content>
